<?php
// {{{ includes
load_class('Model_Base');
load_class('FLEA_Helper_Pager');
// }}}

/**
 * 定义Model_Content
 *
 * @author jack
 * @todo 内容模型
 */

class Model_Content extends Model_Base{
	
	
	var $tableName='contents';
	var $primaryKey='id';
		
	 
	/**
	 * 获取列表
	 *
	 * @param str $conditions
	 * @param int $page
	 * @param int $pageSize
	 * @param str $sort
	 * @return array
	 */
	function getList($conditions='',$page=0,$pageSize=10,$sort='id desc'){
	 	
		$this->Pager=& new FLEA_Helper_Pager($this,$page,$pageSize,$conditions,$sort);
		$result = $this->Pager->findAll();
		$pageData=$this->Pager->getPagerData();
		
		$rowset['recoders']=$result;
	 	$rowset['PageBar']=$this->getPageBar($pageData);
		
	 	return $rowset;
	}
	
	 
	 
	
	
	
	
}

